package com.msb.dp.strategy;

/**
 * @Auther: Huanyu Lee
 * @Date: 2022/3/3  17:14
 * @Description: 狗的比较器
 */
public class DogComparator implements Comparator<Dog>{

    @Override
    public int compare(Dog o1, Dog o2) {
        if (o1.foodAmount < o2.foodAmount)  return -1;
        else if (o1.foodAmount > o2.foodAmount)  return 1;
        return 0;
    }
}
